﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Sinacor.Infra.UI.Common;
using System.Windows.Controls.Primitives;
using System.Windows.Controls;

namespace Sinacor.Infra.UI.Controls.SmartClient
{
    internal class SelectionChangedEventManager : BaseWeakEventManager<SelectionChangedEventManager, Selector, SelectionChangedEventArgs>
    {
        protected override void StartListening(object source)
        {
            Selector s = source as Selector;
            if (s != null)
                s.SelectionChanged += new SelectionChangedEventHandler(HandleEvent);
        }

        protected override void StopListening(object source)
        {
            Selector s = source as Selector;
            if (s != null)
                s.SelectionChanged -= new SelectionChangedEventHandler(HandleEvent);
        }
    }
}
